package org.csmz;

import java.util.Scanner;

public class example13 {

    public static void main(String[] args){
        String password = "123456";
        String intput;

        Scanner scanner = new Scanner(System.in);
        do{
            System.out.println("请输入密码：");
            intput = scanner.nextLine();
        }while (intput != password);//intput != password为循环条件

        System.out.println("密码输入正确");
    }

}
